let obj = {name: "jack", age: "20"};
let p = new Proxy(obj, {
  get(target, property) {
    console.log("我拦截了" + target + "读取" + property);
    console.log("他的值" + target[property]);

    return 'new ' + target[property]
  },
  set(target, property, value) {
    target[property] = 666;
  }
})


console.log(p.age);
p.age = 30;

console.log(p.age);


Object.freeze(obj);
console.log("after freeze:")
console.log(p.age)

let origin = {num: 6};
Object.freeze(origin);
console.log(origin.num)
